#include "inc/core/poisson3d.h"

int poisson3d_init_solver(poisson3d* poisson, int sX, int sY, int sZ)
{
#ifdef _DEBUG_
    printf("poisson3d_init_solver: init solver (%d,%d,%d)\n", sX, sY, sZ);
#endif
    return cufftPlan3d(&(poisson->chandle), sX, sY, sZ, CUFFT_C2C);
}

int poisson3d_clear_solver(poisson3d* poisson)
{
#ifdef _DEBUG_
    printf("poisson3d_clear_solver: clear solver\n");
#endif
    return cufftDestroy(poisson->chandle);
}